<template>
  <ul class="timeline">
    <slot />
    <li>
      <i class="el-icon-time last" />
    </li>
  </ul>
</template>

<script>
export default {
  name: 'TimeLine'
}
</script>

<style rel="stylesheet/scss" lang="scss">

  .timeline {
    position: relative;
    margin: 0 0 30px 0;
    padding: 0;
    list-style: none;

    &:before {
      content: '';
      position: absolute;
      top: 0;
      bottom: 0;
      width: 2px;
      background: #ddd;
      left: 31px;
      margin: 0;
      border-radius: 2px;
    }
    li {
      position: relative;
      margin-right: 10px;
      &:before, &:after  {
        content: " ";
        display: table;
      }
      &:after {
        clear: both;
      }

      .timeline-item {
        // -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.1);
        // box-shadow: 0 1px 1px rgba(0,0,0,0.1);
        border-radius: 3px;
        margin-top: 0;
        background: #fff;
        color: #444;
        margin-left: 60px;
        margin-right: 15px;
        padding: 0;
        position: relative;

        .time {
          color: #999;
          float: right;
          padding: 10px;
          font-size: 12px;
        }

        .timeline-header {
          margin: 0;
          color: #909399;
          border-bottom: 1px solid #f4f4f4;
          padding: 10px;
          font-size: 13px;
        }

        .timeline-body, .timeline-footer {
          padding: 10px;
        }
      }

      .last {
        width: 30px;
        height: 30px;
        font-size: 15px;
        line-height: 30px;
        position: absolute;
        color: #666;
        background: #d2d6de;
        border-radius: 50%;
        text-align: center;
        left: 18px;
        top: 0
      }
    }

    .time-label {
      span {
        font-weight: 100;
      }
    }

    .el-tag {
      color: #fff;
    }

    .red {
      .el-tag {
        background: #dd4b39;
      }
    }

    .green {
      .el-tag {
        background: #00a65a;
      }
    }

    .orange {
      .el-tag {
        background: #f39c12;
      }
    }

    .blue {
      .el-tag {
        background: #409EFF;
      }
    }
  }
</style>
